<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PID_Study: E:/STM32CubeIDEWorkspace/noRTOS/PID_Study/Drivers/BSP/Inc/encoder.h 文件参考</title>
<link rel="icon" href="Doxygen-55px.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="Doxygen-55px.png"/></td>
  <td id="projectalign">
   <div id="projectname">PID_Study<span id="projectnumber">&#160;v1.0.0</span>
   </div>
   <div id="projectbrief">doc for PID_Study</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a href="dir_0c97d201d54b8b5817233953fc3aadb6.html">STM32CubeIDEWorkspace</a></li><li class="navelem"><a href="dir_f3310f12da31771255acec658cd4246d.html">noRTOS</a></li><li class="navelem"><a href="dir_8022218a35d1971722714ae72b00e870.html">PID_Study</a></li><li class="navelem"><a href="dir_17bc370c857333bc4166d76f67bb735c.html">Drivers</a></li><li class="navelem"><a href="dir_b62ba9d628590829d5c152676ba50098.html">BSP</a></li><li class="navelem"><a href="dir_a3931c23c62a4333dd07fbd46d82639c.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle"><div class="title">encoder.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>编码器驱动接口头文件  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;main.h&quot;</code><br />
</div>
<p><a href="encoder_8h_source.html">浏览该文件的源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a381890b23a2294d6907511e7270e63c8" id="r_a381890b23a2294d6907511e7270e63c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a381890b23a2294d6907511e7270e63c8">Encoder_init</a> (void)</td></tr>
<tr class="memdesc:a381890b23a2294d6907511e7270e63c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化编码器相关硬件  <br /></td></tr>
<tr class="memitem:ac8cdfc8f0ca366affce744c2d08302b3" id="r_ac8cdfc8f0ca366affce744c2d08302b3"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac8cdfc8f0ca366affce744c2d08302b3">Encoder_Read</a> (void)</td></tr>
<tr class="memdesc:ac8cdfc8f0ca366affce744c2d08302b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取编码器当前计数值  <br /></td></tr>
<tr class="memitem:a035979daf479c3e4b1641a691941758b" id="r_a035979daf479c3e4b1641a691941758b"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a035979daf479c3e4b1641a691941758b">Encoder_Read_and_clear</a> (void)</td></tr>
<tr class="memdesc:a035979daf479c3e4b1641a691941758b"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取编码器计数值并清零  <br /></td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">详细描述</h2>
<div class="textblock"><p>编码器驱动接口头文件 </p>
<dl class="section author"><dt>作者</dt><dd>废话文学创始人 </dd></dl>
<dl class="section version"><dt>版本</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2024-07-14 </dd></dl>
</div><a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">函数说明</h2>
<a id="a381890b23a2294d6907511e7270e63c8" name="a381890b23a2294d6907511e7270e63c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a381890b23a2294d6907511e7270e63c8">&#9670;&#160;</a></span>Encoder_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Encoder_init </td>
          <td>(</td>
          <td class="paramtype">void</td>          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化编码器相关硬件 </p>
<p>初始化编码器相关硬件</p>
<dl class="section note"><dt>注解</dt><dd>启动定时器编码器模式 </dd></dl>

</div>
</div>
<a id="ac8cdfc8f0ca366affce744c2d08302b3" name="ac8cdfc8f0ca366affce744c2d08302b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8cdfc8f0ca366affce744c2d08302b3">&#9670;&#160;</a></span>Encoder_Read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t Encoder_Read </td>
          <td>(</td>
          <td class="paramtype">void</td>          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取编码器当前计数值 </p>
<dl class="section return"><dt>返回</dt><dd>当前编码器计数值（无符号16位）</dd></dl>
<p>读取编码器当前计数值</p>
<dl class="section return"><dt>返回</dt><dd>当前编码器计数值（无符号16位） </dd></dl>

</div>
</div>
<a id="a035979daf479c3e4b1641a691941758b" name="a035979daf479c3e4b1641a691941758b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a035979daf479c3e4b1641a691941758b">&#9670;&#160;</a></span>Encoder_Read_and_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int16_t Encoder_Read_and_clear </td>
          <td>(</td>
          <td class="paramtype">void</td>          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取编码器计数值并清零 </p>
<dl class="section return"><dt>返回</dt><dd>当前编码器计数值（有符号16位），读取后计数器清零 </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
